package com.example.test_01.activity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import com.example.test_01.R;
import com.example.test_01.adapter.FoodOrderAdapter;
import com.example.test_01.adapter.OrderAdapter;
import com.example.test_01.model.Orders;
import com.example.test_01.service.OrderService;
import com.example.test_01.service.OrderServiceImpl;

import java.util.ArrayList;
import java.util.List;

public class OrderShow extends AppCompatActivity {
    OrderAdapter adapter;
    OrderService service = new OrderServiceImpl();
    List<Orders> list;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_order_show);
        list = service.list();
        RecyclerView recyclerView = findViewById(R.id.rv_order_list);
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
        recyclerView.setLayoutManager(linearLayoutManager);
        adapter = new OrderAdapter();
        recyclerView.setAdapter(adapter);
    }
}